<?xml version="1.0" encoding="UTF-8"?>
<provinces>
  <%- Settings.provinces.each do |province| %>
  <% province.to_hash.each do |province, cities| %>
    <province name='<%= province %>'>
      <%- cities.to_a.each do |city| %>
        <city name='<%= city %>'>
        <% CityChannel.where(city_name: city).published.each do |channel| %>
          <directory seq='<%= channel.seq %>' name='<%= channel.name %>' mode='<%= channel.mode %>'>
            <% channel.programs.each do |program| %>
              <program id='<%= program.television_id %>' name='<%= program.name %>' freq='<%= program.freq %>' channel='<%= program.cmmb_channel %>' sid='<%= program.sid %>' logo='<%= program.logo %>' play_url='<%= program.play_url %>' />
            <% end %>
          </directory>
        <% end %>
        </city>
      <% end %>
    </province>
  <% end %>
  <% end %>
</provinces>
